package com.becca.cake.dao.system;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.becca.cake.model.system.DeptDO;
import com.becca.cake.model.system.Node;

/**
 * 部门管理DAO
 * @author hejinguo
 * @version $Id: DeptDAO.java, v 0.1 2015-12-2 上午12:51:17
 */
@Repository
public interface DeptDAO {
    /**
     * 查询该部门ID下的部门
     * @author hejinguo
     * @param depeId
     * @return
     * @throws DataAccessException
     */
    List<Node> selectDeptTreeById(Long depeId) throws DataAccessException;

    /**
     * 根据id查询部门信息
     * @author hejinguo
     * @param depeId
     * @return
     * @throws DataAccessException
     */
    Node selectDeptById(Long depeId) throws DataAccessException;

    /**
     * 部门管理中根据ID查询部门信息
     * @author hejinguo
     * @param depeId
     * @return
     * @throws Exception
     */
    DeptDO selectDeptMsgById(String depeId) throws DataAccessException;

    /**
     * 添加部门信息
     * @author hejinguo
     * @param functionDO
     * @throws Exception
     */
    void insetDept(DeptDO deptDO) throws DataAccessException;

    /**
     * 修改部门信息
     * @author hejinguo
     * @param functionDO
     * @throws Exception
     */
    void updateDeptById(DeptDO deptDO) throws DataAccessException;
}
